<template>
    <div class="pageInfo">

        <el-pagination v-model:current-page="currentPage2" v-model:page-size="pageSize2"
            :page-sizes="[100, 200, 300, 400]" :size="size" :disabled="disabled" :background="background"
            layout="sizes, prev, pager, next" :total="1000" @size-change="handleSizeChange"
            @current-change="handleCurrentChange" />
    </div>
</template>
<script setup name="pageInfo">
import { ref, computed } from 'vue';
import { requstHosptital } from '@/api/Home.ts';

const count = ref(0);
const doubleCount = computed(() => count.value * 2);

function increment() {
    count.value++;
}

let currentPage2 = ref(1);

let pageSize2 = ref(10);

function handleCurrentChange() {
    requstHosptital(currentPage2.value, pageSize2.value).then(res => {
        console.log('hahha1', res.data.list);

        arr1.value = res.data.list
    })

    console.log(`Current Page`, currentPage2);
}

</script>
<style scoped lang="scss">
.pageInfo {
    display: flex;
    justify-content: center;
}
</style>
